package com.imooc.SmartChargeStation.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.socket.config.annotation.EnableWebSocket;

/**
 * author: zpy
 * description: WebSocket 启动类
 * date: 2024
 * warning:
 *
 * 1.如何启用基于 Tomcat @ServerEndpoint 注解的 WebSocket？
 * a.确保 WebService.java的@ServerEndpoint 注解没有被注释
 *    @ServerEndpoint("/ws/server")
 * b.确保 WebSocketApplication.java的@EnableWebSocket 注解被注释
 *    //@EnableWebSocket
 *
 * 2.如何启用基于 Spring 注解的 WebSocket？
 * 与1.的注释反过来即可
 */

@SpringBootApplication

@EnableWebSocket
public class WebSocketApplication {

    public static void main(String[] args) {

        SpringApplication.run(WebSocketApplication.class, args);
    }
}
